#pragma once 

#ifndef ANIMATION_H
#define ANIMATION_H

#include <string>
#include "EntityManager.h"
#include "MessageHandler.h"
#include <d3d9.h>
#include <d3dx9.h>
#include "Entity.h"
#pragma comment(lib, "d3d9.lib")
#pragma comment(lib, "d3dx9.lib")

class Animation
{
private:
	IDirect3DTexture9* texture;
	int frameWidth;
	int frameHeight;
	int startFrame;
    int endFrame;
	int frameCount;
	float frameTime;
	bool isLooping;
public:
	Animation(IDirect3DTexture9* texture);
	Animation(IDirect3DTexture9* texture, float frameTime, bool isLooping);
	Animation(IDirect3DTexture9* texture, float frameTime, bool isLooping, int startFrame, int endFrame, int frameWidth, int frameHeight);
	IDirect3DTexture9* getTexture() {return texture; } // removed const
	void setTexture(IDirect3DTexture9* newTexture) {texture = newTexture; }
	float getFrameTime() const { return frameTime; }
	void setFrameTime(float newFrameTime) { frameTime = newFrameTime; }
	bool getIsLooping() const { return isLooping; }
	void setIsLooping(bool newIsLooping) { isLooping = newIsLooping; }
	int getStartFrame() const {return startFrame; }
	void setStartFrame(int newStartFrame) { startFrame = newStartFrame; }
	int getEndFrame() const {return endFrame; }
	void setEndFrame(int newEndFrame)  { endFrame = newEndFrame; }
	int getFrameCount() const {return frameCount; }
	void setFrameCount(int newFrameCount) { frameCount = newFrameCount; }
	int getFrameWidth() const {return frameWidth; }
	void setFremeWidth(int newFrameWidth) { frameWidth = newFrameWidth; }
	int getFrameHeight() const {return frameHeight; }
	void setFrameHeight(int newFrameHeight) {frameHeight = newFrameHeight; }
};

#endif 